﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PrepareZoom
{
    public partial class Form1 : Form
    {
        int Row = 1;
        int Col = 5;
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_ResizeEnd(object sender, EventArgs e)
        {
            //Расчет новый координат
            int _w = this.Width / Col - 4;
            int _h = this.Height / Row - 20;

            groupBox1.Width = _w;
            groupBox1.Height = _h;
            groupBox1.Left = 0;
            groupBox1.Top = 0;


            groupBox2.Width = _w;
            groupBox2.Height = _h;
            groupBox2.Left = _w;
            groupBox2.Top = 0;

            groupBox3.Width = _w;
            groupBox3.Height = _h;
            groupBox3.Left = _w*2;
            groupBox3.Top = 0;

            groupBox4.Width = _w;
            groupBox4.Height = _h;
            groupBox4.Left = _w*3;
            groupBox4.Top = 0;

            groupBox5.Width = _w;
            groupBox5.Height = _h;
            groupBox5.Left = _w*4;
            groupBox5.Top = 0;



        }
    }
}
